#include<bits/stdc++.h>
#define ll long long
using namespace std;
struct monster{
    ll num,attack;
}m[100111];
ll cnt=0;
ll n,ans;
ll a[100111];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    ios::sync_with_stdio(0);
    cin.tie(0);cout.tie(0);
    cin>>n;
    ans=n;
    for(ll i=0;i<n;++i){
        cin>>a[i];
    }
    sort(a,a+n);
    m[0].num=1;
    for(ll i=1;i<n;++i){
        if(a[i]==a[i-1]){
            ++m[cnt].num;
        }else{
            m[++cnt].num=1;
        }
    }
    ++cnt;
    for(ll i=0;i<cnt;++i){
        m[i].attack=m[i].num;
    }
    ll last=0;
    for(ll i=1;i<cnt;){
        if(last==i||m[i].attack==0){
            ++i;
            continue;
        }
        if(m[last].num<=m[i].attack){
            ans-=m[last].num;
            m[i].attack-=m[last].num;
            ++last;
        }else{
            ans-=m[i].attack;
            m[last].num-=m[i].attack;
            m[i].attack=0;
        }
    }
    cout<<ans;
    return 0;
}